package cc.fs.zhihuapp.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by fostion on 2015/8/24.
 */
public class Theme implements Parcelable {

    long id;
    String name;
    String thumbnail;
    String description;
    long color;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getColor() {
        return color;
    }

    public void setColor(long color) {
        this.color = color;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.id);
        dest.writeString(this.name);
        dest.writeString(this.thumbnail);
        dest.writeString(this.description);
        dest.writeLong(this.color);
    }

    public Theme() {
    }

    protected Theme(Parcel in) {
        this.id = in.readLong();
        this.name = in.readString();
        this.thumbnail = in.readString();
        this.description = in.readString();
        this.color = in.readLong();
    }

    public static final Parcelable.Creator<Theme> CREATOR = new Parcelable.Creator<Theme>() {
        public Theme createFromParcel(Parcel source) {
            return new Theme(source);
        }

        public Theme[] newArray(int size) {
            return new Theme[size];
        }
    };

    @Override
    public String toString() {
        return "Theme{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", thumbnail='" + thumbnail + '\'' +
                ", description='" + description + '\'' +
                ", color=" + color +
                '}';
    }
}
